/*
 * Copyright 2016-2017 TVI Go Easy.
 * Created on 2017/6/11 21:22
 */
package com.gitee.mechanic.core.enums;

/**
 * Http 状态码
 *
 * @author mechanic
 * @version 0.0.1
 */
public enum HttpCode {

    OK(200, "请求成功"),
    BAD_REQUEST(400, "请求失败"),
    UNAUTHORIZED(401, "尚未登录"),
    FORBIDDEN(403, "没有访问权限"),
    INTERNAL_SERVER_ERROR(500, "服务器异常"),
    SQL_ERROR(3000, "数据库操作错误"),
    SQL_DATA_ERROR(3001, "数据错误"),
    JSON_ERROR(3010, "JSON 操作错误"),
    EXCEL_ERROR(3020, "EXCEL 操作错误"),

    ACCOUNT_PASSWORD_ERROR(3030,"账户或密码错误"),
    ACCOUNT_NOT_EXIST(3031,"用户不存在"),
    OLD_PASSWORD_ERROR(3032,"原始密码错误"),
    WX_UIN_NOT_EXIST(3033,"微信UIN不存在"),

    UPLOAD_ERROR(3040, "文件上传错误"),
    PARAMS_ERROR(3050, "参数错误"),
    CODING_ERROR(3051,"编码错误"),

    //-----SSH异常代码----//
    SSH_ERROR(4000,"SSH 操作异常"),

    //-----微信错误代码---//
    WX_OK(0, "微信请求成功"),
    WX_SYSTEM_BUSY(-1, "系统繁忙，请稍后重试"),
    WX_NO_CONTENT(204,"没有返回消息"),
    WX_MESSAGE_RESOLVE_ERROR(4001, "返回消息解析错误"),
    WX_40001(40001,"获取access_token时Secret错误，或者access_token无效"),
    WX_40002(40002,"不合法的凭证类型"),
    WX_40003(40003,"不合法的UserID"),
    WX_40004(40004,"不合法的媒体文件类型"),
    WX_40005(40005,"不合法的文件类型"),
    WX_40006(40006,"不合法的文件大小"),
    WX_40007(40007,"不合法的媒体文件id"),
    WX_40008(40008,"不合法的消息类型"),
    WX_40013(40013,"不合法的corpid"),
    WX_40014(40014,"不合法的access_token"),
    WX_40015(40015,"不合法的菜单类型"),
    WX_40016(40016,"不合法的按钮个数"),
    WX_40017(40017,"不合法的按钮类型"),
    WX_40018(40018,"不合法的按钮名字长度"),
    WX_40019(40019,"不合法的按钮KEY长度"),
    WX_40020(40020,"不合法的按钮URL长度"),
    WX_40021(40021,"不合法的菜单版本号"),
    WX_40022(40022,"不合法的子菜单级数"),
    WX_40023(40023,"不合法的子菜单按钮个数"),
    WX_40024(40024,"不合法的子菜单按钮类型"),
    WX_40025(40025,"不合法的子菜单按钮名字长度"),
    WX_40026(40026,"不合法的子菜单按钮KEY长度"),
    WX_40027(40027,"不合法的子菜单按钮URL长度"),
    WX_40028(40028,"不合法的自定义菜单使用成员"),
    WX_40029(40029,"不合法的oauth_code"),
    WX_40031(40031,"不合法的UserID列表"),
    WX_40032(40032,"不合法的UserID列表长度"),
    WX_40033(40033,"不合法的请求字符，不能包含\\uxxxx格式的字符"),
    WX_40035(40035,"不合法的参数"),
    WX_40038(40038,"不合法的请求格式"),
    WX_40039(40039,"不合法的URL长度"),
    WX_40040(40040,"不合法的插件token"),
    WX_40041(40041,"不合法的插件id"),
    WX_40042(40042,"不合法的插件会话"),
    WX_40048(40048,"url中包含不合法domain"),
    WX_40054(40054,"不合法的子菜单url域名"),
    WX_40055(40055,"不合法的按钮url域名"),
    WX_40056(40056,"不合法的agentid"),
    WX_40057(40057,"不合法的callbackurl或者callbackurl验证失败"),
    WX_40058(40058,"不合法的红包参数"),
    WX_40059(40059,"不合法的上报地理位置标志位"),
    WX_40060(40060,"设置上报地理位置标志位时没有设置callbackurl"),
    WX_40061(40061,"设置应用头像失败"),
    WX_40062(40062,"不合法的应用模式"),
    WX_40063(40063,"参数为空"),
    WX_40064(40064,"管理组名字已存在"),
    WX_40065(40065,"不合法的管理组名字长度"),
    WX_40066(40066,"不合法的部门列表"),
    WX_40067(40067,"标题长度不合法"),
    WX_40068(40068,"不合法的标签ID"),
    WX_40069(40069,"不合法的标签ID列表"),
    WX_40070(40070,"列表中所有标签（成员）ID都不合法"),
    WX_40071(40071,"不合法的标签名字，标签名字已经存在"),
    WX_40072(40072,"不合法的标签名字长度"),
    WX_40073(40073,"不合法的openid"),
    WX_40074(40074,"news消息不支持指定为高保密消息"),
    WX_40077(40077,"不合法的预授权码"),
    WX_40078(40078,"不合法的临时授权码"),
    WX_40079(40079,"不合法的授权信息"),
    WX_40080(40080,"不合法的suitesecret"),
    WX_40082(40082,"不合法的suitetoken"),
    WX_40083(40083,"不合法的suiteid"),
    WX_40084(40084,"不合法的永久授权码"),
    WX_40085(40085,"不合法的suiteticket"),
    WX_40086(40086,"不合法的第三方应用appid"),
    WX_40091(40091,"CorpID或者Secret无效"),
    WX_40092(40092,"导入文件存在不合法的内容"),
    WX_40093(40093,"不合法的跳转target"),
    WX_40094(40094,"不合法的URL"),
    WX_40095(40095,"修改失败，并发冲突"),
    WX_40125(40123,"无效的appsecret"),
    WX_40163(40163,"CODE被使用"),
    WX_40155(40155,"请勿添加其他公众号的主页链接"),
    WX_41001(41001,"缺少access_token参数"),
    WX_41002(41002,"缺少corpid参数"),
    WX_41003(41003,"缺少refresh_token参数"),
    WX_41004(41004,"缺少secret参数"),
    WX_41005(41005,"缺少多媒体文件数据"),
    WX_41006(41006,"缺少media_id参数"),
    WX_41007(41007,"缺少子菜单数据"),
    WX_41008(41008,"缺少oauth code"),
    WX_41009(41009,"缺少UserID"),
    WX_41010(41010,"缺少url"),
    WX_41011(41011,"缺少agentid"),
    WX_41012(41012,"缺少应用头像mediaid"),
    WX_41013(41013,"缺少应用名字"),
    WX_41014(41014,"缺少应用描述"),
    WX_41015(41015,"缺少Content"),
    WX_41016(41016,"缺少标题"),
    WX_41017(41017,"缺少标签ID"),
    WX_41018(41018,"缺少标签名字"),
    WX_41021(41021,"缺少suiteid"),
    WX_41022(41022,"缺少suitetoken"),
    WX_41023(41023,"缺少suiteticket"),
    WX_41024(41024,"缺少suitesecret"),
    WX_41025(41025,"缺少永久授权码"),
    WX_41034(41034,"缺少login_ticket"),
    WX_41035(41035,"缺少跳转target"),
    WX_42001(42001,"access_token过期"),
    WX_42002(42002,"refresh_token过期"),
    WX_42003(42003,"oauth_code过期"),
    WX_42004(42004,"插件token过期"),
    WX_42007(42007,"预授权码失效"),
    WX_42008(42008,"临时授权码失效"),
    WX_42009(42009,"suitetoken失效"),
    WX_43001(43001,"需要GET请求"),
    WX_43002(43002,"需要POST请求"),
    WX_43003(43003,"需要HTTPS"),
    WX_43004(43004,"需要成员已关注"),
    WX_43005(43005,"需要好友关系"),
    WX_43006(43006,"需要订阅"),
    WX_43007(43007,"需要授权"),
    WX_43008(43008,"需要支付授权"),
    WX_43010(43010,"需要处于回调模式"),
    WX_43011(43011,"需要企业授权"),
    WX_43013(43013,"应用对成员不可见"),
    WX_44001(44001,"多媒体文件为空"),
    WX_44002(44002,"POST的数据包为空"),
    WX_44003(44003,"图文消息内容为空"),
    WX_44004(44004,"文本消息内容为空"),
    WX_45001(45001,"多媒体文件大小超过限制"),
    WX_45002(45002,"消息内容大小超过限制"),
    WX_45003(45003,"标题大小超过限制"),
    WX_45004(45004,"描述大小超过限制"),
    WX_45005(45005,"链接长度超过限制"),
    WX_45006(45006,"图片链接长度超过限制"),
    WX_45007(45007,"语音播放时间超过限制"),
    WX_45008(45008,"图文消息的文章数量不能超过10条"),
    WX_45009(45009,"接口调用超过限制"),
    WX_45010(45010,"创建菜单个数超过限制"),
    WX_45015(45015,"回复时间超过限制"),
    WX_45016(45016,"系统分组，不允许修改"),
    WX_45017(45017,"分组名字过长"),
    WX_45018(45018,"分组数量超过上限"),
    WX_45022(45022,"应用名字长度不合法，合法长度为2-16个字"),
    WX_45024(45024,"帐号数量超过上限"),
    WX_45025(45025,"同一个成员每周只能邀请一次"),
    WX_45026(45026,"触发删除用户数的保护"),
    WX_45027(45027,"mpnews每天只能发送100次"),
    WX_45028(45028,"素材数量超过上限"),
    WX_45029(45029,"media_id对该应用不可见"),
    WX_45032(45032,"作者名字长度超过限制"),
    WX_46001(46001,"不存在媒体数据"),
    WX_46002(46002,"不存在的菜单版本"),
    WX_46003(46003,"不存在的菜单数据"),
    WX_46004(46004,"不存在的成员"),
    WX_47001(47001,"解析JSON/XML内容错误"),
    WX_48001(48001,"Api未授权"),
    WX_48002(48002,"Api禁用(一般是管理组类型与Api不匹配，例如普通管理组调用会话服务的Api)"),
    WX_48003(48003,"suitetoken无效"),
    WX_48004(48004,"授权关系无效"),
    WX_48005(48005,"Api已废弃"),
    WX_50001(50001,"redirect_uri未授权"),
    WX_50002(50002,"成员不在权限范围"),
    WX_50003(50003,"应用已停用"),
    WX_50004(50004,"成员状态不正确，需要成员为企业验证中状态"),
    WX_50005(50005,"企业已禁用"),
    WX_60001(60001,"部门长度不符合限制"),
    WX_60002(60002,"部门层级深度超过限制"),
    WX_60003(60003,"部门不存在"),
    WX_60004(60004,"父亲部门不存在"),
    WX_60005(60005,"不允许删除有成员的部门"),
    WX_60006(60006,"不允许删除有子部门的部门"),
    WX_60007(60007,"不允许删除根部门"),
    WX_60008(60008,"部门ID或者部门名称已存在"),
    WX_60009(60009,"部门名称含有非法字符"),
    WX_60010(60010,"部门存在循环关系"),
    WX_60011(60011,"管理组权限不足，（user/department/agent）无权限"),
    WX_60012(60012,"不允许删除默认应用"),
    WX_60013(60013,"不允许关闭应用"),
    WX_60014(60014,"不允许开启应用"),
    WX_60015(60015,"不允许修改默认应用可见范围"),
    WX_60016(60016,"不允许删除存在成员的标签"),
    WX_60017(60017,"不允许设置企业"),
    WX_60019(60019,"不允许设置应用地理位置上报开关"),
    WX_60020(60020,"访问ip不在白名单之中"),
    WX_60023(60023,"已授权的应用不允许企业管理组调用接口修改菜单"),
    WX_60025(60025,"主页型应用不支持的消息类型"),
    WX_60027(60027,"不支持第三方修改主页型应用字段"),
    WX_60028(60028,"应用已授权予第三方，不允许通过接口修改主页url"),
    WX_60029(60029,"应用已授权予第三方，不允许通过接口修改可信域名"),
    WX_60031(60031,"未设置管理组的登录授权域名"),
    WX_60102(60102,"UserID已存在"),
    WX_60103(60103,"手机号码不合法"),
    WX_60104(60104,"手机号码已存在"),
    WX_60105(60105,"邮箱不合法"),
    WX_60106(60106,"邮箱已存在"),
    WX_60107(60107,"微信号不合法"),
    WX_60108(60108,"微信号已存在"),
    WX_60109(60109,"QQ号已存在"),
    WX_60110(60110,"用户同时归属部门超过20个"),
    WX_60111(60111,"UserID不存在"),
    WX_60112(60112,"成员姓名不合法"),
    WX_60113(60113,"身份认证信息（微信号/手机/邮箱）不能同时为空"),
    WX_60114(60114,"性别不合法"),
    WX_60115(60115,"已关注成员微信不能修改"),
    WX_60116(60116,"扩展属性已存在"),
    WX_60118(60118,"成员无有效邀请字段，详情参考(邀请成员关注)的接口说明"),
    WX_60119(60119,"成员已关注"),
    WX_60120(60120,"成员已禁用"),
    WX_60121(60121,"找不到该成员"),
    WX_60122(60122,"邮箱已被外部管理员使用"),
    WX_60123(60123,"无效的部门id"),
    WX_60124(60124,"无效的父部门id"),
    WX_60125(60125,"非法部门名字，长度超过限制、重名等，重名包括与csv文件中同级部门重名或者与旧组织架构包含成员的同级部门重名"),
    WX_60126(60126,"创建部门失败"),
    WX_60127(60127,"缺少部门id"),
    WX_60128(60128,"字段不合法，可能存在主键冲突或者格式错误"),
    WX_60129(60129,"用户设置了拒绝邀请"),
    WX_60131(60131,"不合法的职位长度"),
    WX_80001(80001,"可信域名不匹配，或者可信域名没有IPC备案（后续将不能在该域名下正常使用jssdk）"),
    WX_81003(81003,"邀请额度已用完"),
    WX_81004(81004,"部门数量超过上限"),
    WX_81011(81011,"无权限操作该标签"),
    WX_82001(82001,"发送消息或者邀请的参数全部为空或者全部不合法"),
    WX_82002(82002,"不合法的PartyID列表长度"),
    WX_82003(82003,"不合法的TagID列表长度"),
    WX_82004(82004,"微信版本号过低"),
    WX_84013(84013,"企业会话、客服套件已下线"),
    WX_85002(85002,"包含不合法的词语"),
    WX_86001(86001,"不合法的会话ID"),
    WX_86003(86003,"不存在的会话ID"),
    WX_86004(86004,"不合法的会话名"),
    WX_86005(86005,"不合法的会话管理员"),
    WX_86006(86006,"不合法的成员列表大小"),
    WX_86007(86007,"不存在的成员"),
    WX_86101(86101,"需要会话管理员权限"),
    WX_86201(86201,"缺少会话ID"),
    WX_86202(86202,"缺少会话名"),
    WX_86203(86203,"缺少会话管理员"),
    WX_86204(86204,"缺少成员"),
    WX_86205(86205,"非法的会话ID长度"),
    WX_86206(86206,"非法的会话ID数值"),
    WX_86207(86207,"会话管理员不在用户列表中"),
    WX_86208(86208,"消息服务未开启"),
    WX_86209(86209,"缺少操作者"),
    WX_86210(86210,"缺少会话参数"),
    WX_86211(86211,"缺少会话类型（单聊或者群聊）"),
    WX_86213(86213,"缺少发件人"),
    WX_86214(86214,"非法的会话类型"),
    WX_86215(86215,"会话已存在"),
    WX_86216(86216,"非法会话成员"),
    WX_86217(86217,"会话操作者不在成员列表中"),
    WX_86218(86218,"非法会话发件人"),
    WX_86219(86219,"非法会话收件人"),
    WX_86220(86220,"非法会话操作者"),
    WX_86221(86221,"单聊模式下，发件人与收件人不能为同一人"),
    WX_86222(86222,"不允许消息服务访问的API"),
    WX_86304(86304,"不合法的消息类型"),
    WX_86305(86305,"客服服务未启用"),
    WX_86306(86306,"缺少发送人"),
    WX_86307(86307,"缺少发送人类型"),
    WX_86308(86308,"缺少发送人id"),
    WX_86309(86309,"缺少接收人"),
    WX_86310(86310,"缺少接收人类型"),
    WX_86311(86311,"缺少接收人id"),
    WX_86312(86312,"缺少消息类型"),
    WX_86313(86313,"缺少客服，发送人或接收人类型，必须有一个为kf"),
    WX_86314(86314,"客服不唯一，发送人或接收人类型，必须只有一个为kf"),
    WX_86315(86315,"不合法的发送人类型"),
    WX_86316(86316,"不合法的发送人id。Userid不存在、openid不存在、kf不存在"),
    WX_86317(86317,"不合法的接收人类型"),
    WX_86318(86318,"不合法的接收人id。Userid不存在、openid不存在、kf不存在"),
    WX_86319(86319,"不合法的客服，kf不在客服列表中"),
    WX_86320(86320,"不合法的客服类型"),
    WX_88001(88001,"缺少seq参数"),
    WX_88002(88002,"缺少offset参数"),
    WX_88003(88003,"非法seq"),
    WX_90001(90001,"未认证摇一摇周边"),
    WX_90002(90002,"缺少摇一摇周边ticket参数"),
    WX_90003(90003,"摇一摇周边ticket参数不合法"),
    WX_90004(90004,"摇一摇周边ticket过期"),
    WX_90005(90005,"未开启摇一摇周边服务"),
    WX_91004(91004,"卡券已被核销"),
    WX_91011(91011,"无效的code"),
    WX_91014(91014,"缺少卡券详情"),
    WX_91015(91015,"代金券缺少least_cost或者reduce_cost参数"),
    WX_91016(91016,"折扣券缺少discount参数"),
    WX_91017(91017,"礼品券缺少gift参数"),
    WX_91019(91019,"缺少卡券sku参数"),
    WX_91020(91020,"缺少卡券有效期"),
    WX_91021(91021,"缺少卡券有效期类型"),
    WX_91022(91022,"缺少卡券logo_url"),
    WX_91023(91023,"缺少卡券code类型"),
    WX_91025(91025,"缺少卡券title"),
    WX_91026(91026,"缺少卡券color"),
    WX_91027(91027,"缺少offset参数"),
    WX_91028(91028,"缺少count参数"),
    WX_91029(91029,"缺少card_id"),
    WX_91030(91030,"缺少卡券code"),
    WX_91031(91031,"缺少卡券notice"),
    WX_91032(91032,"缺少卡券description"),
    WX_91033(91033,"缺少ticket类型"),
    WX_91036(91036,"不合法的有效期"),
    WX_91038(91038,"变更库存值不合法"),
    WX_91039(91039,"不合法的卡券id"),
    WX_91040(91040,"不合法的ticket type"),
    WX_91041(91041,"没有创建，上传卡券logo，以及核销卡券的权限"),
    WX_91042(91042,"没有该卡券投放权限"),
    WX_91043(91043,"没有修改或者删除该卡券的权限"),
    WX_91044(91044,"不合法的卡券参数"),
    WX_91045(91045,"缺少团购券groupon结构"),
    WX_91046(91046,"缺少现金券cash结构"),
    WX_91047(91047,"缺少折扣券discount 结构"),
    WX_91048(91048,"缺少礼品券gift结构"),
    WX_91049(91049,"缺少优惠券coupon结构"),
    WX_91050(91050,"缺少卡券必填字段"),
    WX_91051(91051,"商户名称超过12个汉字"),
    WX_91052(91052,"卡券标题超过9个汉字"),
    WX_91053(91053,"卡券提醒超过16个汉字"),
    WX_91054(91054,"卡券描述超过1024个汉字"),
    WX_91055(91055,"卡券副标题长度超过18个汉字"),
    WX_91058(91058,"未开通卡券服务，不允许调用卡券接口"),
    WX_301009(301009,"错误原因to user&party&tag 为空");

    private final int code;
    private final String message;


    HttpCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
